\(\int \frac {A+B x^2}{\sqrt {e x} \sqrt {a+b x^2}} \, dx\) [803]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [A] (verified)
   Fricas [C] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 26, antiderivative size = 139 \[ \int \frac {A+B x^2}{\sqrt {e x} \sqrt {a+b x^2}} \, dx=\frac {2 B \sqrt {e x} \sqrt {a+b x^2}}{3 b e}+\frac {(3 A b-a B) \left (\sqrt {a}+\sqrt {b} x\right ) \sqrt {\frac {a+b x^2}{\left (\sqrt {a}+\sqrt {b} x\right )^2}} \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt [4]{b} \sqrt {e x}}{\sqrt [4]{a} \sqrt {e}}\right ),\frac {1}{2}\right )}{3 \sqrt [4]{a} b^{5/4} \sqrt {e} \sqrt {a+b x^2}} \]

[Out]

2/3*B*(e*x)^(1/2)*(b*x^2+a)^(1/2)/b/e+1/3*(3*A*b-B*a)*(cos(2*arctan(b^(1/4)*(e*x)^(1/2)/a^(1/4)/e^(1/2)))^2)^(
1/2)/cos(2*arctan(b^(1/4)*(e*x)^(1/2)/a^(1/4)/e^(1/2)))*EllipticF(sin(2*arctan(b^(1/4)*(e*x)^(1/2)/a^(1/4)/e^(
1/2))),1/2*2^(1/2))*(a^(1/2)+x*b^(1/2))*((b*x^2+a)/(a^(1/2)+x*b^(1/2))^2)^(1/2)/a^(1/4)/b^(5/4)/e^(1/2)/(b*x^2
+a)^(1/2)

Rubi [A] (verified)

Time = 0.06 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {470, 335, 226} \[ \int \frac {A+B x^2}{\sqrt {e x} \sqrt {a+b x^2}} \, dx=\frac {\left (\sqrt {a}+\sqrt {b} x\right ) \sqrt {\frac {a+b x^2}{\left (\sqrt {a}+\sqrt {b} x\right )^2}} (3 A b-a B) \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt [4]{b} \sqrt {e x}}{\sqrt [4]{a} \sqrt {e}}\right ),\frac {1}{2}\right )}{3 \sqrt [4]{a} b^{5/4} \sqrt {e} \sqrt {a+b x^2}}+\frac {2 B \sqrt {e x} \sqrt {a+b x^2}}{3 b e} \]

[In]

Int[(A + B*x^2)/(Sqrt[e*x]*Sqrt[a + b*x^2]),x]

[Out]

(2*B*Sqrt[e*x]*Sqrt[a + b*x^2])/(3*b*e) + ((3*A*b - a*B)*(Sqrt[a] + Sqrt[b]*x)*Sqrt[(a + b*x^2)/(Sqrt[a] + Sqr
t[b]*x)^2]*EllipticF[2*ArcTan[(b^(1/4)*Sqrt[e*x])/(a^(1/4)*Sqrt[e])], 1/2])/(3*a^(1/4)*b^(5/4)*Sqrt[e]*Sqrt[a
+ b*x^2])

Rule 226

Int[1/Sqrt[(a_) + (b_.)*(x_)^4], x_Symbol] :> With[{q = Rt[b/a, 4]}, Simp[(1 + q^2*x^2)*(Sqrt[(a + b*x^4)/(a*(
1 + q^2*x^2)^2)]/(2*q*Sqrt[a + b*x^4]))*EllipticF[2*ArcTan[q*x], 1/2], x]] /; FreeQ[{a, b}, x] && PosQ[b/a]

Rule 335

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> With[{k = Denominator[m]}, Dist[k/c, Subst[I
nt[x^(k*(m + 1) - 1)*(a + b*(x^(k*n)/c^n))^p, x], x, (c*x)^(1/k)], x]] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0]
 && FractionQ[m] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 470

Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[d*(e*x)^(m +
 1)*((a + b*x^n)^(p + 1)/(b*e*(m + n*(p + 1) + 1))), x] - Dist[(a*d*(m + 1) - b*c*(m + n*(p + 1) + 1))/(b*(m +
 n*(p + 1) + 1)), Int[(e*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x] && NeQ[b*c - a*d, 0]
 && NeQ[m + n*(p + 1) + 1, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {2 B \sqrt {e x} \sqrt {a+b x^2}}{3 b e}-\frac {\left (2 \left (-\frac {3 A b}{2}+\frac {a B}{2}\right )\right ) \int \frac {1}{\sqrt {e x} \sqrt {a+b x^2}} \, dx}{3 b} \\ & = \frac {2 B \sqrt {e x} \sqrt {a+b x^2}}{3 b e}+\frac {(2 (3 A b-a B)) \text {Subst}\left (\int \frac {1}{\sqrt {a+\frac {b x^4}{e^2}}} \, dx,x,\sqrt {e x}\right )}{3 b e} \\ & = \frac {2 B \sqrt {e x} \sqrt {a+b x^2}}{3 b e}+\frac {(3 A b-a B) \left (\sqrt {a}+\sqrt {b} x\right ) \sqrt {\frac {a+b x^2}{\left (\sqrt {a}+\sqrt {b} x\right )^2}} F\left (2 \tan ^{-1}\left (\frac {\sqrt [4]{b} \sqrt {e x}}{\sqrt [4]{a} \sqrt {e}}\right )|\frac {1}{2}\right )}{3 \sqrt [4]{a} b^{5/4} \sqrt {e} \sqrt {a+b x^2}} \\ \end{align*}

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 4 in optimal.

Time = 10.04 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.57 \[ \int \frac {A+B x^2}{\sqrt {e x} \sqrt {a+b x^2}} \, dx=\frac {2 x \left (B \left (a+b x^2\right )+(3 A b-a B) \sqrt {1+\frac {b x^2}{a}} \operatorname {Hypergeometric2F1}\left (\frac {1}{4},\frac {1}{2},\frac {5}{4},-\frac {b x^2}{a}\right )\right )}{3 b \sqrt {e x} \sqrt {a+b x^2}} \]

[In]

Integrate[(A + B*x^2)/(Sqrt[e*x]*Sqrt[a + b*x^2]),x]

[Out]

(2*x*(B*(a + b*x^2) + (3*A*b - a*B)*Sqrt[1 + (b*x^2)/a]*Hypergeometric2F1[1/4, 1/2, 5/4, -((b*x^2)/a)]))/(3*b*
Sqrt[e*x]*Sqrt[a + b*x^2])

Maple [A] (verified)

Time = 3.10 (sec) , antiderivative size = 168, normalized size of antiderivative = 1.21

method result size
risch \(\frac {2 B x \sqrt {b \,x^{2}+a}}{3 b \sqrt {e x}}+\frac {\left (3 A b -B a \right ) \sqrt {-a b}\, \sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}\, \sqrt {-\frac {2 \left (x -\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}\, \sqrt {-\frac {x b}{\sqrt {-a b}}}\, F\left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right ) \sqrt {\left (b \,x^{2}+a \right ) e x}}{3 b^{2} \sqrt {b e \,x^{3}+a e x}\, \sqrt {e x}\, \sqrt {b \,x^{2}+a}}\) \(168\)
elliptic \(\frac {\sqrt {\left (b \,x^{2}+a \right ) e x}\, \left (\frac {2 B \sqrt {b e \,x^{3}+a e x}}{3 b e}+\frac {\left (A -\frac {a B}{3 b}\right ) \sqrt {-a b}\, \sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}\, \sqrt {-\frac {2 \left (x -\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}\, \sqrt {-\frac {x b}{\sqrt {-a b}}}\, F\left (\sqrt {\frac {\left (x +\frac {\sqrt {-a b}}{b}\right ) b}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right )}{b \sqrt {b e \,x^{3}+a e x}}\right )}{\sqrt {e x}\, \sqrt {b \,x^{2}+a}}\) \(169\)
default \(\frac {3 A \sqrt {2}\, \sqrt {-a b}\, \sqrt {\frac {b x +\sqrt {-a b}}{\sqrt {-a b}}}\, \sqrt {\frac {-b x +\sqrt {-a b}}{\sqrt {-a b}}}\, \sqrt {-\frac {x b}{\sqrt {-a b}}}\, F\left (\sqrt {\frac {b x +\sqrt {-a b}}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right ) b -B \sqrt {2}\, \sqrt {-a b}\, \sqrt {\frac {b x +\sqrt {-a b}}{\sqrt {-a b}}}\, \sqrt {\frac {-b x +\sqrt {-a b}}{\sqrt {-a b}}}\, \sqrt {-\frac {x b}{\sqrt {-a b}}}\, F\left (\sqrt {\frac {b x +\sqrt {-a b}}{\sqrt {-a b}}}, \frac {\sqrt {2}}{2}\right ) a +2 b^{2} B \,x^{3}+2 B a b x}{3 \sqrt {b \,x^{2}+a}\, \sqrt {e x}\, b^{2}}\) \(214\)

[In]

int((B*x^2+A)/(e*x)^(1/2)/(b*x^2+a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/3*B/b*x*(b*x^2+a)^(1/2)/(e*x)^(1/2)+1/3*(3*A*b-B*a)/b^2*(-a*b)^(1/2)*((x+(-a*b)^(1/2)/b)/(-a*b)^(1/2)*b)^(1/
2)*(-2*(x-(-a*b)^(1/2)/b)/(-a*b)^(1/2)*b)^(1/2)*(-x/(-a*b)^(1/2)*b)^(1/2)/(b*e*x^3+a*e*x)^(1/2)*EllipticF(((x+
(-a*b)^(1/2)/b)/(-a*b)^(1/2)*b)^(1/2),1/2*2^(1/2))*((b*x^2+a)*e*x)^(1/2)/(e*x)^(1/2)/(b*x^2+a)^(1/2)

Fricas [C] (verification not implemented)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.09 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.36 \[ \int \frac {A+B x^2}{\sqrt {e x} \sqrt {a+b x^2}} \, dx=\frac {2 \, {\left (\sqrt {b x^{2} + a} \sqrt {e x} B b - {\left (B a - 3 \, A b\right )} \sqrt {b e} {\rm weierstrassPInverse}\left (-\frac {4 \, a}{b}, 0, x\right )\right )}}{3 \, b^{2} e} \]

[In]

integrate((B*x^2+A)/(e*x)^(1/2)/(b*x^2+a)^(1/2),x, algorithm="fricas")

[Out]

2/3*(sqrt(b*x^2 + a)*sqrt(e*x)*B*b - (B*a - 3*A*b)*sqrt(b*e)*weierstrassPInverse(-4*a/b, 0, x))/(b^2*e)

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 1.76 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.68 \[ \int \frac {A+B x^2}{\sqrt {e x} \sqrt {a+b x^2}} \, dx=\frac {A \sqrt {x} \Gamma \left (\frac {1}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{4}, \frac {1}{2} \\ \frac {5}{4} \end {matrix}\middle | {\frac {b x^{2} e^{i \pi }}{a}} \right )}}{2 \sqrt {a} \sqrt {e} \Gamma \left (\frac {5}{4}\right )} + \frac {B x^{\frac {5}{2}} \Gamma \left (\frac {5}{4}\right ) {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, \frac {5}{4} \\ \frac {9}{4} \end {matrix}\middle | {\frac {b x^{2} e^{i \pi }}{a}} \right )}}{2 \sqrt {a} \sqrt {e} \Gamma \left (\frac {9}{4}\right )} \]

[In]

integrate((B*x**2+A)/(e*x)**(1/2)/(b*x**2+a)**(1/2),x)

[Out]

A*sqrt(x)*gamma(1/4)*hyper((1/4, 1/2), (5/4,), b*x**2*exp_polar(I*pi)/a)/(2*sqrt(a)*sqrt(e)*gamma(5/4)) + B*x*
*(5/2)*gamma(5/4)*hyper((1/2, 5/4), (9/4,), b*x**2*exp_polar(I*pi)/a)/(2*sqrt(a)*sqrt(e)*gamma(9/4))

Maxima [F]

\[ \int \frac {A+B x^2}{\sqrt {e x} \sqrt {a+b x^2}} \, dx=\int { \frac {B x^{2} + A}{\sqrt {b x^{2} + a} \sqrt {e x}} \,d x } \]

[In]

integrate((B*x^2+A)/(e*x)^(1/2)/(b*x^2+a)^(1/2),x, algorithm="maxima")

[Out]

integrate((B*x^2 + A)/(sqrt(b*x^2 + a)*sqrt(e*x)), x)

Giac [F]

\[ \int \frac {A+B x^2}{\sqrt {e x} \sqrt {a+b x^2}} \, dx=\int { \frac {B x^{2} + A}{\sqrt {b x^{2} + a} \sqrt {e x}} \,d x } \]

[In]

integrate((B*x^2+A)/(e*x)^(1/2)/(b*x^2+a)^(1/2),x, algorithm="giac")

[Out]

integrate((B*x^2 + A)/(sqrt(b*x^2 + a)*sqrt(e*x)), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {A+B x^2}{\sqrt {e x} \sqrt {a+b x^2}} \, dx=\int \frac {B\,x^2+A}{\sqrt {e\,x}\,\sqrt {b\,x^2+a}} \,d x \]

[In]

int((A + B*x^2)/((e*x)^(1/2)*(a + b*x^2)^(1/2)),x)

[Out]

int((A + B*x^2)/((e*x)^(1/2)*(a + b*x^2)^(1/2)), x)